package com.zz.common.cassandra

import com.typesafe.config.Config
import io.getquill.{CassandraAsyncContext, SnakeCase}

object CassandraConfig {

  def apply(config: Config): CassandraConfig = {

    CassandraConfig(
        keyspace = config.getString("cassandra.common.keyspace")
//      , coreTable = config.getString("cassandra.tables.core-table-name")
//      , eventTable = config.getString("cassandra.tables.event-table-name")
//      , beaconTable = config.getString("cassandra.tables.beacon-table-name")
      , ctxW = CassandraClient.ctx("cassandra.main.write")
      , ctxR = CassandraClient.ctx("cassandra.main.write")
    )
  }

}

final case class CassandraConfig(
    keyspace: String
//    , coreTable: String
//    , eventTable: String
//  , beaconTable: String
  , ctxW: CassandraAsyncContext[SnakeCase]
  , ctxR: CassandraAsyncContext[SnakeCase]
)
